
/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* Enhanced Downloads Module - Version 1.5 for Nuke 6.5                 */
/* Copyright (c) 2002 by Shawn Archer                                   */
/* http://www.NukeStyles.com                                            */
/*                                                                      */
/************************************************************************/



Copyright Notice:

You MUST upload the copyright file in this Module. You
can do anything else you like, but uploading the copyright file
is required. Give me some credit for my HARD work please. That
is all I ask.

Warranty:

There is none. No warranty is given or even implied. MAKE SURE
YOU BACK UP your original files & database before installing this one.
If you break it, you get to fix it. Use our support forums for help.
DO NOT contact me with email for help... they will be ignored. Use
the forums, that is what it's there for.



Translations:
============

Bulgarian language translation by:    Informator @ http://www.informator.org/
German language translation by:       Robert Hamburger @ http://prian.dyndns.org
French language translation by:       NukeFrance @ http://www.nukefrance.com



INSTALLATION:
============

First: BACK UP YOUR DATABASE! I can't stress this enough! BACK IT UP!
Also, BACK UP YOUR ORIGINAL FILES FOR YOUR DOWNLOAD MOD.


- Upload

======================================================================

admin - 

case.ns_downloads.php   ====> html/admin/case/case.ns_downloads.php
links.ns_downloads.php  ====> html/admin/links/links.ns_downloads.php
ns_downloads.php        ====> html/admin/modules/ns_downloads.php
downloads.php           ====> html/admin/modules/downloads.php


The language admin files are for UN-MODIFIED ADMIN LANGUAGE FILES.
If you have a modified admin language file, then DO NOT upload the 
lang files provided. Open each of the text files, and copy the new 
definitions to corresponding language files.


lang-bulgarian.php      ====> html/admin/language
lang-english.php        ====> html/admin/language
lang-german.php         ====> html/admin/language

lang-bulgarian.txt      Copy & Paste to - html/admin/language/lang-bulgarian.php
lang-english.txt        Copy & Paste to - html/admin/language/lang-english.php
lang-german.txt         Copy & Paste to - html/admin/language/lang-german.php


========================================================================


images -

ns_main.gif             ====> html/images/admin/
arrow_up.gif            ====> html/images/custom/  - Create directory: custom
arrow_down.gif          ====> html/images/custom/
topofpage.gif           ====> html/images/custom/


next.gif                ====> html/themes/Your_Theme/images/
previous.gif            ====> html/themes/Your_Theme/images/


Upload the ns_main.gif to your html/images/admin folder. Upload the up & down
arrow.gif's & topofpage.gif to html/images/custom. If there is no custom directory, create one.
The next & previous gif's included are generic with transparent backgrounds.
These can be used on all themes, or you can customize your own for each theme.
These 6 images are all that is required for installation.


========================================================================


modules -

index.php               ====> html/modules/Downloads/index.php
ns_downloads_file.php   ====> html/modules/Downloads/ns_downloads_file.php
ns_error.php            ====> html/modules/Downloads/ns_error.php
voteinclude.php         ====> html/modules/Downloads/voteinclude.php
copyright.php           ====> html/modules/Downloads/copyright.php


lang-bulgarian.php      ====> html/modules/Downloads/language/lang-bulgarian.php
lang-english.php        ====> html/modules/Downloads/language/lang-english.php
lang-french.php         ====> html/modules/Downloads/language/lang-french.php
lang-german.php         ====> html/modules/Downloads/language/lang-german.php



========================================================================


New Images:
===========

You now have the ability to use the download footer images, like you see
on NukeStyles.com. These images include:


   Homepage - Rate - Broken - Details - Comments - Editorial
   
   
If you do not wish to use them, simply do not upload the folder and images.
The new folder and images are in the x-footimages/downloads folder. There
are 2 different locations for these images, if you choose to use them.



modules/Downloads/images/downloads/   ======>  These are the Standard Images

themes/Your_Theme/images/downloads/   ======>  These are the Theme Images



What is the difference? These images work EXACTLY like the Topics & Your Account
image folders. If you upload the standard image folder in your downloads module
folder, AND upload the folder to the themes/images folder... Then the script will
choose the Themes images BEFORE the standard. This way, if you have some made for
your favorite theme, then it will use those first. If a user chooses a different
theme that you have no download images for, then the Standard images are used.
If the script detects NO IMAGES at all, then the text links are used.

So... If you don't want to use any images... simply do not upload the new folder
with the images. If you just want standard images, upload the folder to the
modules/Downloads/images folder. If you want them for just ONE THEME, then
upload them to just the themes/Your_Theme/images folder. You can use different
systems for this as you design different images. The choice is left up to you.


========================================================================


nukestyles_new_install.php -


nukestyles_new_install.php  ====> html/nukestyles_new_install.php


This upgrade file is for FRESH INSTALLS ONLY. If you have never used
this Enhanced Download Mod, then you NEED to upgrade. If you already
have version 1.0 - 1.4, you DO NOT NEED to run this upgrade file again.


========================================================================



NOTE: Depending on the theme(s) your using... You always have to configure
      your Open & Close Table functions. You MUST make your OpenTable2();
      function stretch to the width of 100%. This is a MUST. The actual
      Table 2 function is used in the ENTIRE NUKE script, about 4-5 times.
      To change the OpenTable2 functions... you have to open either your
      theme.php file, or if you have a file called tables.php, edit that one
      instead... The files are located:

      html/themes/Your_Theme/theme.php

      or

      html/themes/Your_Theme/tables.php

      If you have a tables.php file, then that is the file to edit, as it
      has your tables functions. If you do not see a tables.php file, and
      only see a theme.php file, then your table functions are in that file.
      This will NOT affect your website. The only serious place was
      in the Members List module, when it show's who is online. For
      10000 times the appearance of our Enhanced Downloads Mod, you need
      to make your OpenTable2(); functions with the width of 100%, for
      BOTH tables in that function. You have a table inside a table. 
      Stretch both. We took the unused table 2 functions and put them
      to good use throughout our Enhanced 6.0 Full script... 



========================================================================



ex-themes - EXAMPLE FOLDER

This part of the installation is NOT REQUIRED. You can choose to create some
images for your Downloads Module, or simply choose not too. The only images
that are required, is the next.gif & previous.gif located in the images folder
of each theme. If you want to create the custom images, just follow these examples:

The themes folder structure is simple. Open up your default theme. Create 
the folder structure like this:


themes/Your_Theme/                                     <=== Already Structured    
themes/Your_Theme/images/                              <=== Already Structured 
themes/Your_Theme/images/module_titles/                <=== Create Directory
themes/Your_Theme/images/module_titles/Downloads/      <=== Create Directory


Upload the next & previous gif's to the themes/Your_Theme/images/ folder.
These 2 images are REQUIRED. You can customize them for each theme.


In your themes/Your_Theme/images/ folder, create a directory called
'module_titles'. This is where your Main Downloads Image goes. This is
in place of the Downloads Image that is default for nuke. If no custom
image is found, then it uses the default image seen for every DL Module.


INSIDE the 'module_titles' directory, create another
directory, called 'Downloads'. This directory is for your Mod Title
secondary images. These images are for all the different functions
inside the downloads module. For example, if you submit a search
through the Search Form, and you created the images & uploaded them
to the themes/Your_Theme/images/module_titles/Downloads/ folder, then
they will automatically show up, for Search Results, ect. The same goes
for the Featured Links, Main Categories, ect, images you see on NukeStyles.com.

The best way to do this is, create a temp folder, and place all the
images & folder structures from this zip file into it. Then, create 
your own images, overwriting each one of ours, one at a time. Then, 
upload the folder structure and images, and your all set.

Again, if you don't want to create the images, then it will default to 
simple text if no images exsist. 


=========================================================================


- Install


After everything is uploaded ( you can upload images at your own pace ),
then goto:

http://www.yoursite/nukestyles_new_install.php

This will upgrade the database for you, and install the new ns_downloads 
table for the configurations. Nothing else should be needed.



- Configure


In your administration settings, click the link for
NukeStyles Downloads. On this page, you will see all the
settings for this module. The default settings are installed
when the upgrade script is ran... this way, your module will
run even if you don't configure the settings first. Explainations
are supplied for the settings, so you should be all set. They
are clearly marked.

If you would like to use the option for allowing user's to
browse the downloads module, and only have to register to actually
download a file, then you need to open up the index.php file
located in:

modules/Downloads/index.php

At almost the very top of the file, is the setting for $regdownload.
If you want the user's to have to register to download the file,
then change this setting to a 1. If you don't want to force registration
for downloading files, then just leave this setting as it is. If edited,
then you need to reupload the index.php file for the changes to take
effect.

The admin option will be added in the next release. Sorry for any
inconvenience, but I needed to get this thing released!



- Activate

Next, click your Modules link in the administration settings,
and Activate your the module, if it's not activated already.



- Adding & Modifying

With the 2 new values for each download, the Description Image,
and the Compatibility, you have to go through each download and
edit them. You can add the values easily through the admin.



- Themes

First thing: A little tip for all your themes.

I shall explain this again:

The OpenTable2 & CloseTable2 are used throughout Nuke about
4-5 times total. Almost worthless. We took these settings
and made them useable. But, in order for them to be the best
looking, you should make the OpenTable2(); tables with a 
width of 100%. As of now, they only expand to the length
of the content inside them. So if you have a couple words
inside the tables, it will shrink and look all wacky. I suggest
you make the OpenTable2(); tables at full width of 100%.

As you can see on NukeStyles.com, all of our enhancements use
the open & close 2 tables everywhere, and they are at 100% width.
It just makes everything look a whole lot better, trust me.

Just add this setting to the OpenTable2(); function for BOTH 
tables inside the function:

 width=\"100%\" 

If you add them to the end of the <table> tag, then put a space
before it... Should be perfect. This will NOT affect anything
else in your website... again, it's used so seldom, that it
will make those seldom used tables look that much better.

MORE:


The Additional Details page for the themes, is set up for using
different color config's. They are prbgcolor1, prbgcolor2,
tttextcolor, and tbtextcolor.

$prbgcolor1 = The color for the Table Headers
$prbgcolor2 = The color for the Table Body
$tttextcolor = The font color for the Table Header
$tbtextcolor = The font color for the Table Body

I added these settings because of all the conflicts with the 
regular $bgcolors throughout the script.


How to add:
==========

Open up your theme.php file, and find where these color configs
are located:

$bgcolor1 = "#COLOR";
$bgcolor2 = "#COLOR";
$bgcolor3 = "#COLOR";
$bgcolor4 = "#COLOR";
$textcolor1 = "#COLOR";
$textcolor2 = "#COLOR";

Add these lines AFTER those:

$prbgcolor1 = "#COLOR";
$prbgcolor2 = "#COLOR";
$tttextcolor = "#COLOR";
$tbtextcolor = "#COLOR";

Replace the #COLOR with your chosen 6 digit colors: ie - #EAEACD
Make sure you don't touch the quotes or semicolon, and stay inside
them.


Next:
====

Open your header.php file located in your main directory, NOT the
header.php file in your theme. In the directory html/header.php.
Find this big line of code, located almost at the very top of the file:


    global $slogan, $sitename, $banners, $nukeurl, $Version_Num, 
$artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, 
$bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, 
$adminpage, $userpage, $pagetitle;


Copy & Paste these settings AFTER $pagetitle but BEFORE the semicolon ( ; ).


, $prbgcolor1, $prbgcolor2, $tttextcolor, $tbtextcolor


It should now look like this:


    global $slogan, $sitename, $banners, $nukeurl, $Version_Num, 
$artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, 
$bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, 
$adminpage, $userpage, $pagetitle, $prbgcolor1, $prbgcolor2, $tttextcolor, 
$tbtextcolor;



Thats it... Your all set to use the custom color's for the downloads mod.
These pertain to the additional details page, just like on NukeStyles.
Of course, you can customize the color's for each theme, and have it
look 10 times better than the default details page.



======================================================

If you can translate some language files, please
contact me using our new Contact plus mod, at:

http://www.NukeStyles.com/modules.php?name=Contact

======================================================



FINISH:
======

Hope you like the new Enhanced Downloads Module. If you have any
questions, please use our Support Forum at NukeStyles.com. Again,
DO NOT EMAIL ME for help. I get tons of emails, so please use
the support forum! Thanks!

If you find any bugs or errors in this module, then please report
them to: bugs@nukestyles.com or post them in the forum.


Happy Nuking!

Shawn Archer
http://www.NukeStyles.com




